Micron Document
🎖️GitЯра🎖️


Displaying Raw • Download

feature/connections/src/commonMain/kotlin/org/meshtastic/feature/connections/navigation/ConnectionsNavigation.kt bbc85dcf76f45477480f03848c9f694969e3c8fb (bbc85dcf) Text, 2.43 KB

T8b949e/*
* Copyright (c) 2026 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
Tff7b72package T7ee787org.meshtastic.feature.connections.navigation

Tff7b72import T7ee787androidx.compose.runtime.LaunchedEffect
Tff7b72import T7ee787androidx.navigation3.runtime.EntryProviderScope
Tff7b72import T7ee787androidx.navigation3.runtime.NavBackStack
Tff7b72import T7ee787androidx.navigation3.runtime.NavKey
Tff7b72import T7ee787org.koin.compose.viewmodel.koinViewModel
Tff7b72import T7ee787org.meshtastic.core.navigation.ConnectionsRoute
Tff7b72import T7ee787org.meshtastic.core.navigation.NodesRoute
Tff7b72import T7ee787org.meshtastic.feature.connections.NO_DEVICE_SELECTED
Tff7b72import T7ee787org.meshtastic.feature.connections.ScannerViewModel
Tff7b72import T7ee787org.meshtastic.feature.connections.ui.ConnectionsScreen
Tff7b72import T7ee787org.meshtastic.feature.settings.radio.RadioConfigViewModel

T8b949e/** Navigation graph for for the top level ConnectionsScreen - [ConnectionsRoute.Connections]. */
Tff7b72fun Td2a8ffEntryProviderScopeTff7b72<Te6edf3NavKeyTff7b72>Tb4b4b4.Te6edf3connectionsGraphTb4b4b4(Te6edf3backStackTb4b4b4: Te6edf3NavBackStackTff7b72<Te6edf3NavKeyTff7b72>Tb4b4b4) Tb4b4b4{
Te6edf3entryTff7b72<Te6edf3ConnectionsRouteTb4b4b4.Te6edf3ConnectionsTff7b72> Tb4b4b4{ Te6edf3key Tff7b72-Tff7b72>
Tff7b72val Te6edf3scanModel Tff7b72= Te6edf3koinViewModelTff7b72<Te6edf3ScannerViewModelTff7b72>Tb4b4b4(Tb4b4b4)
T8b949e// Lets a deep link (e.g. from AI/automation tooling) trigger a connection, or a disconnect via `n`, without
T8b949e// manual device selection.
Te6edf3LaunchedEffectTb4b4b4(Te6edf3keyTb4b4b4.Te6edf3addressTb4b4b4) Tb4b4b4{
Te6edf3keyTb4b4b4.Te6edf3addressTff7b72?.Te6edf3takeIfTb4b4b4(Tffa657StringTff7b72::Te6edf3isNotBlankTb4b4b4)Tff7b72?.Te6edf3let Tb4b4b4{ Te6edf3address Tff7b72-Tff7b72>
Tff7b72if Tb4b4b4(Te6edf3address Tff7b72=Tff7b72= Te6edf3NO_DEVICE_SELECTEDTb4b4b4) Te6edf3scanModelTb4b4b4.Te6edf3disconnectTb4b4b4(Tb4b4b4) Tff7b72else Te6edf3scanModelTb4b4b4.Te6edf3changeDeviceAddressTb4b4b4(Te6edf3addressTb4b4b4)
Tb4b4b4}
Tb4b4b4}
Te6edf3ConnectionsScreenTb4b4b4(
Te6edf3scanModel Tff7b72= Te6edf3scanModelTb4b4b4,
Te6edf3radioConfigViewModel Tff7b72= Te6edf3koinViewModelTff7b72<Te6edf3RadioConfigViewModelTff7b72>Tb4b4b4(Tb4b4b4)Tb4b4b4,
Te6edf3onClickNodeChip Tff7b72= Tb4b4b4{ Te6edf3id Tff7b72-Tff7b72> Te6edf3backStackTb4b4b4.Te6edf3addTb4b4b4(Te6edf3NodesRouteTb4b4b4.Te6edf3NodeDetailTb4b4b4(Te6edf3idTb4b4b4)Tb4b4b4) Tb4b4b4}Tb4b4b4,
Te6edf3onNavigateToNodeDetails Tff7b72= Tb4b4b4{ Te6edf3id Tff7b72-Tff7b72> Te6edf3backStackTb4b4b4.Te6edf3addTb4b4b4(Te6edf3NodesRouteTb4b4b4.Te6edf3NodeDetailTb4b4b4(Te6edf3idTb4b4b4)Tb4b4b4) Tb4b4b4}Tb4b4b4,
Te6edf3onConfigNavigate Tff7b72= Tb4b4b4{ Te6edf3route Tff7b72-Tff7b72> Te6edf3backStackTb4b4b4.Te6edf3addTb4b4b4(Te6edf3routeTb4b4b4) Tb4b4b4}Tb4b4b4,
Tb4b4b4)
Tb4b4b4}
Tb4b4b4}

Served by rngit 1.5.4 - Generated in 0.03s